package cn.cdm.domain;

/**
 * 商品表，与数据库的表goods一一对应。
 * 其实，与数据库表结构一一对应的Java实体类，可以统一放在po包（persistence object）下，表示这个Java实体类都是持久层对象。
 *
 */
public class Goods {
	private Long id; // 商品id
	private String goodsName;
	private String goodsTitle;
	private String goodsImg;
	private String goodsDetail;
	private Double goodsPrice;
	private Integer goodsStock; // 商品的库存。不是秒杀商品的库存数量
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getGoodsName() {
		return goodsName;
	}
	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}
	public String getGoodsTitle() {
		return goodsTitle;
	}
	public void setGoodsTitle(String goodsTitle) {
		this.goodsTitle = goodsTitle;
	}
	public String getGoodsImg() {
		return goodsImg;
	}
	public void setGoodsImg(String goodsImg) {
		this.goodsImg = goodsImg;
	}
	public String getGoodsDetail() {
		return goodsDetail;
	}
	public void setGoodsDetail(String goodsDetail) {
		this.goodsDetail = goodsDetail;
	}
	public Double getGoodsPrice() {
		return goodsPrice;
	}
	public void setGoodsPrice(Double goodsPrice) {
		this.goodsPrice = goodsPrice;
	}
	public Integer getGoodsStock() {
		return goodsStock;
	}
	public void setGoodsStock(Integer goodsStock) {
		this.goodsStock = goodsStock;
	}

	@Override
	public String toString() {
		return "Goods{" +
				"id=" + id +
				", goodsName='" + goodsName + '\'' +
				", goodsTitle='" + goodsTitle + '\'' +
				", goodsImg='" + goodsImg + '\'' +
				", goodsDetail='" + goodsDetail + '\'' +
				", goodsPrice=" + goodsPrice +
				", goodsStock=" + goodsStock +
				'}';
	}
}
